package br.ufpe.cin.mac.middleware.autonomic;

public class Transition {

	private Config beforeConfig;

	private Config afterConfig;

	private String rule;

	public Transition(Config beforeConfig, Config afterConfig, String rule) {
		this.beforeConfig = beforeConfig;
		this.afterConfig = afterConfig;
		this.rule = rule;
	}

	public Transition() {
		this.beforeConfig = null;
		this.afterConfig = null;
		this.rule = null;
	}

	/**
	 * @return the afterConfig
	 */
	public Config getAfterConfig() {
		return afterConfig;
	}

	/**
	 * @param afterConfig
	 *            the afterConfig to set
	 */
	public void setAfterConfig(Config afterConfig) {
		if (afterConfig != null)
			this.afterConfig = afterConfig;
	}

	/**
	 * @return the beforeConfig
	 */
	public Config getBeforeConfig() {
		return beforeConfig;
	}

	/**
	 * @param beforeConfig
	 *            the beforeConfig to set
	 */
	public void setBeforeConfig(Config beforeConfig) {
		if (beforeConfig != null)
			this.beforeConfig = beforeConfig;
	}

	/**
	 * @return the rule
	 */
	public String getRule() {
		return rule;
	}

	/**
	 * @param rule
	 *            the rule to set
	 */
	public void setRule(String rule) {
		if (rule != null)
			this.rule = rule;
	}

}
